package com.dragon.concurrent.demo.synchornized;

public class TicketWindowsTest {

    public static void main(String[] args) throws InterruptedException {
        TicketWindows ticketWindows = new TicketWindows();
        Thread thread1 = new Thread(ticketWindows, "1号窗口");
        Thread thread2 = new Thread(ticketWindows, "2号窗口");
        Thread thread3 = new Thread(ticketWindows, "3号窗口");
        thread1.start();
        thread2.start();
        thread3.start();
        thread1.join();
        thread2.join();
        thread3.join();
        System.out.println("运行结束");
    }
}
